<template>
	<span class="ui-price">
		<span class="ui-price-unit">{{ currency }}</span><slot>{{ value }}</slot>
	</span>
</template>

<script>
export default {
	name: 'ui-price',
	props: {
		value: Number | String
	},
	computed: {
        currency () {
            return this.$store.state.config.currency;
        }
   },
   methods: {
   		handleFormatInt() {
            /*if(!this.price) return '0';
            let price = Math.abs(Number(this.price));
            return parseInt(price);*/
        },
        handleFormatDecimal() {
            /*if(!this.price) return '00';
            let nums = this.price.toString().split('.');
            if(nums.length == 1) return '00';
            if(nums[1].toString().length < 2) return nums[1] + '0';
            return nums[1];*/
        }
   }
}
</script>